{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Affix from '../affix';\nimport { ConfigContext } from '../config-provider';\nimport getScroll from '../_util/getScroll';\nimport scrollTo from '../_util/scrollTo';\nimport warning from '../_util/warning';\nimport AnchorContext from './context';\nimport AnchorLink from './AnchorLink';\nimport useStyle from './style';\nfunction getDefaultContainer() {\n  return window;\n}\nfunction getOffsetTop(element, container) {\n  if (!element.getClientRects().length) {\n    return 0;\n  }\n  const rect = element.getBoundingClientRect();\n  if (rect.width || rect.height) {\n    if (container === window) {\n      container = element.ownerDocument.documentElement;\n      return rect.top - container.clientTop;\n    }\n    return rect.top - container.getBoundingClientRect().top;\n  }\n  return rect.top;\n}\nconst sharpMatcherRegx = /#([\\S ]+)$/;\nconst AnchorContent = props => {\n  var _a;\n  const {\n    rootClassName,\n    anchorPrefixCls: prefixCls,\n    className = '',\n    style,\n    offsetTop,\n    affix = true,\n    showInkInFixed = false,\n    children,\n    items,\n    bounds,\n    targetOffset,\n    onClick,\n    onChange,\n    getContainer,\n    getCurrentAnchor\n  } = props;\n  // =================== Warning =====================\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!children, 'Anchor', '`Anchor children` is deprecated. Please use `items` instead.') : void 0;\n  }\n  const [links, setLinks] = React.useState([]);\n  const [activeLink, setActiveLink] = React.useState(null);\n  const activeLinkRef = React.useRef(activeLink);\n  const wrapperRef = React.useRef(null);\n  const spanLinkNode = React.useRef(null);\n  const animating = React.useRef(false);\n  const {\n    direction,\n    getTargetContainer\n  } = React.useContext(ConfigContext);\n  const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;\n  const dependencyListItem = JSON.stringify(links);\n  const registerLink = React.useCallback(link => {\n    if (!links.includes(link)) {\n      setLinks(prev => [].concat(_toConsumableArray(prev), [link]));\n    }\n  }, [dependencyListItem]);\n  const unregisterLink = React.useCallback(link => {\n    if (links.includes(link)) {\n      setLinks(prev => prev.filter(i => i !== link));\n    }\n  }, [dependencyListItem]);\n  const updateInk = () => {\n    var _a;\n    const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);\n    if (linkNode && spanLinkNode.current) {\n      spanLinkNode.current.style.top = `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;\n      spanLinkNode.current.style.height = `${linkNode.clientHeight}px`;\n    }\n  };\n  const getInternalCurrentAnchor = function (_links) {\n    let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n    const linkSections = [];\n    const container = getCurrentContainer();\n    _links.forEach(link => {\n      const sharpLinkMatch = sharpMatcherRegx.exec(link === null || link === void 0 ? void 0 : link.toString());\n      if (!sharpLinkMatch) {\n        return;\n      }\n      const target = document.getElementById(sharpLinkMatch[1]);\n      if (target) {\n        const top = getOffsetTop(target, container);\n        if (top < _offsetTop + _bounds) {\n          linkSections.push({\n            link,\n            top\n          });\n        }\n      }\n    });\n    if (linkSections.length) {\n      const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);\n      return maxSection.link;\n    }\n    return '';\n  };\n  const setCurrentActiveLink = link => {\n    if (activeLinkRef.current === link) {\n      return;\n    }\n    // https://github.com/ant-design/ant-design/issues/30584\n    const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;\n    setActiveLink(newLink);\n    activeLinkRef.current = newLink;\n    // onChange should respect the original link (which may caused by\n    // window scroll or user click), not the new link\n    onChange === null || onChange === void 0 ? void 0 : onChange(link);\n  };\n  const handleScroll = React.useCallback(() => {\n    if (animating.current) {\n      return;\n    }\n    if (typeof getCurrentAnchor === 'function') {\n      return;\n    }\n    const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);\n    setCurrentActiveLink(currentActiveLink);\n  }, [dependencyListItem, targetOffset, offsetTop]);\n  const handleScrollTo = React.useCallback(link => {\n    setCurrentActiveLink(link);\n    const container = getCurrentContainer();\n    const scrollTop = getScroll(container, true);\n    const sharpLinkMatch = sharpMatcherRegx.exec(link);\n    if (!sharpLinkMatch) {\n      return;\n    }\n    const targetElement = document.getElementById(sharpLinkMatch[1]);\n    if (!targetElement) {\n      return;\n    }\n    const eleOffsetTop = getOffsetTop(targetElement, container);\n    let y = scrollTop + eleOffsetTop;\n    y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;\n    animating.current = true;\n    scrollTo(y, {\n      getContainer: getCurrentContainer,\n      callback() {\n        animating.current = false;\n      }\n    });\n  }, [targetOffset, offsetTop]);\n  const inkClass = classNames({\n    [`${prefixCls}-ink-ball-visible`]: activeLink\n  }, `${prefixCls}-ink-ball`);\n  const wrapperClass = classNames(rootClassName, `${prefixCls}-wrapper`, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className);\n  const anchorClass = classNames(prefixCls, {\n    [`${prefixCls}-fixed`]: !affix && !showInkInFixed\n  });\n  const wrapperStyle = Object.assign({\n    maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'\n  }, style);\n  const createNestedLink = options => Array.isArray(options) ? options.map(item => /*#__PURE__*/React.createElement(AnchorLink, Object.assign({}, item, {\n    key: item.key\n  }), createNestedLink(item.children))) : null;\n  const anchorContent = /*#__PURE__*/React.createElement(\"div\", {\n    ref: wrapperRef,\n    className: wrapperClass,\n    style: wrapperStyle\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: anchorClass\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-ink`\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: inkClass,\n    ref: spanLinkNode\n  })), 'items' in props ? createNestedLink(items) : children));\n  React.useEffect(() => {\n    const scrollContainer = getCurrentContainer();\n    handleScroll();\n    scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);\n    return () => {\n      scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);\n    };\n  }, [dependencyListItem]);\n  React.useEffect(() => {\n    if (typeof getCurrentAnchor === 'function') {\n      setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));\n    }\n  }, [getCurrentAnchor]);\n  React.useEffect(() => {\n    updateInk();\n  }, [getCurrentAnchor, dependencyListItem, activeLink]);\n  const memoizedContextValue = React.useMemo(() => ({\n    registerLink,\n    unregisterLink,\n    scrollTo: handleScrollTo,\n    activeLink,\n    onClick\n  }), [activeLink, onClick, handleScrollTo]);\n  return /*#__PURE__*/React.createElement(AnchorContext.Provider, {\n    value: memoizedContextValue\n  }, affix ? /*#__PURE__*/React.createElement(Affix, {\n    offsetTop: offsetTop,\n    target: getCurrentContainer\n  }, anchorContent) : anchorContent);\n};\nconst Anchor = props => {\n  const {\n    prefixCls: customizePrefixCls\n  } = props;\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const anchorPrefixCls = getPrefixCls('anchor', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(anchorPrefixCls);\n  return wrapSSR( /*#__PURE__*/React.createElement(AnchorContent, Object.assign({}, props, {\n    rootClassName: hashId,\n    anchorPrefixCls: anchorPrefixCls\n  })));\n};\nexport default Anchor;","map":{"version":3,"names":["_toConsumableArray","classNames","React","Affix","ConfigContext","getScroll","scrollTo","warning","AnchorContext","AnchorLink","useStyle","getDefaultContainer","window","getOffsetTop","element","container","getClientRects","length","rect","getBoundingClientRect","width","height","ownerDocument","documentElement","top","clientTop","sharpMatcherRegx","AnchorContent","props","_a","rootClassName","anchorPrefixCls","prefixCls","className","style","offsetTop","affix","showInkInFixed","children","items","bounds","targetOffset","onClick","onChange","getContainer","getCurrentAnchor","process","env","NODE_ENV","links","setLinks","useState","activeLink","setActiveLink","activeLinkRef","useRef","wrapperRef","spanLinkNode","animating","direction","getTargetContainer","useContext","getCurrentContainer","dependencyListItem","JSON","stringify","registerLink","useCallback","link","includes","prev","concat","unregisterLink","filter","i","updateInk","linkNode","current","querySelector","clientHeight","getInternalCurrentAnchor","_links","_offsetTop","arguments","undefined","_bounds","linkSections","forEach","sharpLinkMatch","exec","toString","target","document","getElementById","push","maxSection","reduce","curr","setCurrentActiveLink","newLink","handleScroll","currentActiveLink","handleScrollTo","scrollTop","targetElement","eleOffsetTop","y","callback","inkClass","wrapperClass","anchorClass","wrapperStyle","Object","assign","maxHeight","createNestedLink","options","Array","isArray","map","item","createElement","key","anchorContent","ref","useEffect","scrollContainer","addEventListener","removeEventListener","memoizedContextValue","useMemo","Provider","value","Anchor","customizePrefixCls","getPrefixCls","wrapSSR","hashId"],"sources":["/data/messenger.client/node_modules/antd/es/anchor/Anchor.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Affix from '../affix';\nimport { ConfigContext } from '../config-provider';\nimport getScroll from '../_util/getScroll';\nimport scrollTo from '../_util/scrollTo';\nimport warning from '../_util/warning';\nimport AnchorContext from './context';\nimport AnchorLink from './AnchorLink';\nimport useStyle from './style';\nfunction getDefaultContainer() {\n  return window;\n}\nfunction getOffsetTop(element, container) {\n  if (!element.getClientRects().length) {\n    return 0;\n  }\n  const rect = element.getBoundingClientRect();\n  if (rect.width || rect.height) {\n    if (container === window) {\n      container = element.ownerDocument.documentElement;\n      return rect.top - container.clientTop;\n    }\n    return rect.top - container.getBoundingClientRect().top;\n  }\n  return rect.top;\n}\nconst sharpMatcherRegx = /#([\\S ]+)$/;\nconst AnchorContent = props => {\n  var _a;\n  const {\n    rootClassName,\n    anchorPrefixCls: prefixCls,\n    className = '',\n    style,\n    offsetTop,\n    affix = true,\n    showInkInFixed = false,\n    children,\n    items,\n    bounds,\n    targetOffset,\n    onClick,\n    onChange,\n    getContainer,\n    getCurrentAnchor\n  } = props;\n  // =================== Warning =====================\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!children, 'Anchor', '`Anchor children` is deprecated. Please use `items` instead.') : void 0;\n  }\n  const [links, setLinks] = React.useState([]);\n  const [activeLink, setActiveLink] = React.useState(null);\n  const activeLinkRef = React.useRef(activeLink);\n  const wrapperRef = React.useRef(null);\n  const spanLinkNode = React.useRef(null);\n  const animating = React.useRef(false);\n  const {\n    direction,\n    getTargetContainer\n  } = React.useContext(ConfigContext);\n  const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;\n  const dependencyListItem = JSON.stringify(links);\n  const registerLink = React.useCallback(link => {\n    if (!links.includes(link)) {\n      setLinks(prev => [].concat(_toConsumableArray(prev), [link]));\n    }\n  }, [dependencyListItem]);\n  const unregisterLink = React.useCallback(link => {\n    if (links.includes(link)) {\n      setLinks(prev => prev.filter(i => i !== link));\n    }\n  }, [dependencyListItem]);\n  const updateInk = () => {\n    var _a;\n    const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);\n    if (linkNode && spanLinkNode.current) {\n      spanLinkNode.current.style.top = `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;\n      spanLinkNode.current.style.height = `${linkNode.clientHeight}px`;\n    }\n  };\n  const getInternalCurrentAnchor = function (_links) {\n    let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n    const linkSections = [];\n    const container = getCurrentContainer();\n    _links.forEach(link => {\n      const sharpLinkMatch = sharpMatcherRegx.exec(link === null || link === void 0 ? void 0 : link.toString());\n      if (!sharpLinkMatch) {\n        return;\n      }\n      const target = document.getElementById(sharpLinkMatch[1]);\n      if (target) {\n        const top = getOffsetTop(target, container);\n        if (top < _offsetTop + _bounds) {\n          linkSections.push({\n            link,\n            top\n          });\n        }\n      }\n    });\n    if (linkSections.length) {\n      const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);\n      return maxSection.link;\n    }\n    return '';\n  };\n  const setCurrentActiveLink = link => {\n    if (activeLinkRef.current === link) {\n      return;\n    }\n    // https://github.com/ant-design/ant-design/issues/30584\n    const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;\n    setActiveLink(newLink);\n    activeLinkRef.current = newLink;\n    // onChange should respect the original link (which may caused by\n    // window scroll or user click), not the new link\n    onChange === null || onChange === void 0 ? void 0 : onChange(link);\n  };\n  const handleScroll = React.useCallback(() => {\n    if (animating.current) {\n      return;\n    }\n    if (typeof getCurrentAnchor === 'function') {\n      return;\n    }\n    const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);\n    setCurrentActiveLink(currentActiveLink);\n  }, [dependencyListItem, targetOffset, offsetTop]);\n  const handleScrollTo = React.useCallback(link => {\n    setCurrentActiveLink(link);\n    const container = getCurrentContainer();\n    const scrollTop = getScroll(container, true);\n    const sharpLinkMatch = sharpMatcherRegx.exec(link);\n    if (!sharpLinkMatch) {\n      return;\n    }\n    const targetElement = document.getElementById(sharpLinkMatch[1]);\n    if (!targetElement) {\n      return;\n    }\n    const eleOffsetTop = getOffsetTop(targetElement, container);\n    let y = scrollTop + eleOffsetTop;\n    y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;\n    animating.current = true;\n    scrollTo(y, {\n      getContainer: getCurrentContainer,\n      callback() {\n        animating.current = false;\n      }\n    });\n  }, [targetOffset, offsetTop]);\n  const inkClass = classNames({\n    [`${prefixCls}-ink-ball-visible`]: activeLink\n  }, `${prefixCls}-ink-ball`);\n  const wrapperClass = classNames(rootClassName, `${prefixCls}-wrapper`, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className);\n  const anchorClass = classNames(prefixCls, {\n    [`${prefixCls}-fixed`]: !affix && !showInkInFixed\n  });\n  const wrapperStyle = Object.assign({\n    maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'\n  }, style);\n  const createNestedLink = options => Array.isArray(options) ? options.map(item => /*#__PURE__*/React.createElement(AnchorLink, Object.assign({}, item, {\n    key: item.key\n  }), createNestedLink(item.children))) : null;\n  const anchorContent = /*#__PURE__*/React.createElement(\"div\", {\n    ref: wrapperRef,\n    className: wrapperClass,\n    style: wrapperStyle\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: anchorClass\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-ink`\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: inkClass,\n    ref: spanLinkNode\n  })), 'items' in props ? createNestedLink(items) : children));\n  React.useEffect(() => {\n    const scrollContainer = getCurrentContainer();\n    handleScroll();\n    scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);\n    return () => {\n      scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);\n    };\n  }, [dependencyListItem]);\n  React.useEffect(() => {\n    if (typeof getCurrentAnchor === 'function') {\n      setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));\n    }\n  }, [getCurrentAnchor]);\n  React.useEffect(() => {\n    updateInk();\n  }, [getCurrentAnchor, dependencyListItem, activeLink]);\n  const memoizedContextValue = React.useMemo(() => ({\n    registerLink,\n    unregisterLink,\n    scrollTo: handleScrollTo,\n    activeLink,\n    onClick\n  }), [activeLink, onClick, handleScrollTo]);\n  return /*#__PURE__*/React.createElement(AnchorContext.Provider, {\n    value: memoizedContextValue\n  }, affix ? /*#__PURE__*/React.createElement(Affix, {\n    offsetTop: offsetTop,\n    target: getCurrentContainer\n  }, anchorContent) : anchorContent);\n};\nconst Anchor = props => {\n  const {\n    prefixCls: customizePrefixCls\n  } = props;\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const anchorPrefixCls = getPrefixCls('anchor', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(anchorPrefixCls);\n  return wrapSSR( /*#__PURE__*/React.createElement(AnchorContent, Object.assign({}, props, {\n    rootClassName: hashId,\n    anchorPrefixCls: anchorPrefixCls\n  })));\n};\nexport default Anchor;"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,aAAa,MAAM,WAAW;AACrC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,QAAQ,MAAM,SAAS;AAC9B,SAASC,mBAAmB,GAAG;EAC7B,OAAOC,MAAM;AACf;AACA,SAASC,YAAY,CAACC,OAAO,EAAEC,SAAS,EAAE;EACxC,IAAI,CAACD,OAAO,CAACE,cAAc,EAAE,CAACC,MAAM,EAAE;IACpC,OAAO,CAAC;EACV;EACA,MAAMC,IAAI,GAAGJ,OAAO,CAACK,qBAAqB,EAAE;EAC5C,IAAID,IAAI,CAACE,KAAK,IAAIF,IAAI,CAACG,MAAM,EAAE;IAC7B,IAAIN,SAAS,KAAKH,MAAM,EAAE;MACxBG,SAAS,GAAGD,OAAO,CAACQ,aAAa,CAACC,eAAe;MACjD,OAAOL,IAAI,CAACM,GAAG,GAAGT,SAAS,CAACU,SAAS;IACvC;IACA,OAAOP,IAAI,CAACM,GAAG,GAAGT,SAAS,CAACI,qBAAqB,EAAE,CAACK,GAAG;EACzD;EACA,OAAON,IAAI,CAACM,GAAG;AACjB;AACA,MAAME,gBAAgB,GAAG,YAAY;AACrC,MAAMC,aAAa,GAAGC,KAAK,IAAI;EAC7B,IAAIC,EAAE;EAC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